3.1289 \(\int x (a+b \tan ^{-1}(c x)) (d+e \log (1+c^2 x^2)) \, dx\)

Optimal. Leaf size=137 \[ \frac {e \left (c^2 x^2+1\right ) \log \left (c^2 x^2+1\right ) \left (a+b \tan ^{-1}(c x)\right )}{2 c^2}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {b (d-e) \tan ^{-1}(c x)}{2 c^2}-\frac {b e x \log \left (c^2 x^2+1\right )}{2 c}-\frac {b e \tan ^{-1}(c x)}{c^2}-\frac {b x (d-e)}{2 c}+\frac {b e x}{c} \]

[Out]

-1/2*b*(d-e)*x/c+b*e*x/c+1/2*b*(d-e)*arctan(c*x)/c^2-b*e*arctan(c*x)/c^2+1/2*d*x^2*(a+b*arctan(c*x))-1/2*e*x^2
*(a+b*arctan(c*x))-1/2*b*e*x*ln(c^2*x^2+1)/c+1/2*e*(c^2*x^2+1)*(a+b*arctan(c*x))*ln(c^2*x^2+1)/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {2454, 2389, 2295, 5019, 321, 203, 2448} \[ \frac {e \left (c^2 x^2+1\right ) \log \left (c^2 x^2+1\right ) \left (a+b \tan ^{-1}(c x)\right )}{2 c^2}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {b (d-e) \tan ^{-1}(c x)}{2 c^2}-\frac {b e x \log \left (c^2 x^2+1\right )}{2 c}-\frac {b e \tan ^{-1}(c x)}{c^2}-\frac {b x (d-e)}{2 c}+\frac {b e x}{c} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]),x]

[Out]

-(b*(d - e)*x)/(2*c) + (b*e*x)/c + (b*(d - e)*ArcTan[c*x])/(2*c^2) - (b*e*ArcTan[c*x])/c^2 + (d*x^2*(a + b*Arc
Tan[c*x]))/2 - (e*x^2*(a + b*ArcTan[c*x]))/2 - (b*e*x*Log[1 + c^2*x^2])/(2*c) + (e*(1 + c^2*x^2)*(a + b*ArcTan
[c*x])*Log[1 + c^2*x^2])/(2*c^2)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2448

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 5019

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + Log[(f_.) + (g_.)*(x_)^2]*(e_.))*(x_)^(m_.), x_Symbol] :> With
[{u = IntHide[x^m*(d + e*Log[f + g*x^2]), x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[ExpandIntegrand[u
/(1 + c^2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, g}, x] && IGtQ[(m + 1)/2, 0]

Rubi steps

\begin {align*} \int x \left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right ) \, dx &=\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {e \left (1+c^2 x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{2 c^2}-(b c) \int \left (\frac {(d-e) x^2}{2 \left (1+c^2 x^2\right )}+\frac {e \log \left (1+c^2 x^2\right )}{2 c^2}\right ) \, dx\\ &=\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {e \left (1+c^2 x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{2 c^2}-\frac {1}{2} (b c (d-e)) \int \frac {x^2}{1+c^2 x^2} \, dx-\frac {(b e) \int \log \left (1+c^2 x^2\right ) \, dx}{2 c}\\ &=-\frac {b (d-e) x}{2 c}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {b e x \log \left (1+c^2 x^2\right )}{2 c}+\frac {e \left (1+c^2 x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{2 c^2}+\frac {(b (d-e)) \int \frac {1}{1+c^2 x^2} \, dx}{2 c}+(b c e) \int \frac {x^2}{1+c^2 x^2} \, dx\\ &=-\frac {b (d-e) x}{2 c}+\frac {b e x}{c}+\frac {b (d-e) \tan ^{-1}(c x)}{2 c^2}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {b e x \log \left (1+c^2 x^2\right )}{2 c}+\frac {e \left (1+c^2 x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{2 c^2}-\frac {(b e) \int \frac {1}{1+c^2 x^2} \, dx}{c}\\ &=-\frac {b (d-e) x}{2 c}+\frac {b e x}{c}+\frac {b (d-e) \tan ^{-1}(c x)}{2 c^2}-\frac {b e \tan ^{-1}(c x)}{c^2}+\frac {1}{2} d x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )-\frac {b e x \log \left (1+c^2 x^2\right )}{2 c}+\frac {e \left (1+c^2 x^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{2 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 105, normalized size = 0.77 \[ \frac {e \log \left (c^2 x^2+1\right ) \left (a c^2 x^2+a-b c x\right )+c x (a c x (d-e)-b (d-3 e))+b \tan ^{-1}(c x) \left (c^2 d x^2-e \left (c^2 x^2+3\right )+\left (c^2 e x^2+e\right ) \log \left (c^2 x^2+1\right )+d\right )}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]),x]

[Out]

(c*x*(-(b*(d - 3*e)) + a*c*(d - e)*x) + e*(a - b*c*x + a*c^2*x^2)*Log[1 + c^2*x^2] + b*ArcTan[c*x]*(d + c^2*d*
x^2 - e*(3 + c^2*x^2) + (e + c^2*e*x^2)*Log[1 + c^2*x^2]))/(2*c^2)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 116, normalized size = 0.85 \[ \frac {{\left (a c^{2} d - a c^{2} e\right )} x^{2} - {\left (b c d - 3 \, b c e\right )} x + {\left ({\left (b c^{2} d - b c^{2} e\right )} x^{2} + b d - 3 \, b e\right )} \arctan \left (c x\right ) + {\left (a c^{2} e x^{2} - b c e x + a e + {\left (b c^{2} e x^{2} + b e\right )} \arctan \left (c x\right )\right )} \log \left (c^{2} x^{2} + 1\right )}{2 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="fricas")

[Out]

1/2*((a*c^2*d - a*c^2*e)*x^2 - (b*c*d - 3*b*c*e)*x + ((b*c^2*d - b*c^2*e)*x^2 + b*d - 3*b*e)*arctan(c*x) + (a*
c^2*e*x^2 - b*c*e*x + a*e + (b*c^2*e*x^2 + b*e)*arctan(c*x))*log(c^2*x^2 + 1))/c^2

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [C]  time = 2.68, size = 3074, normalized size = 22.44 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1)),x)

[Out]

3/2*b*e*x/c-1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I/((1+I*c*x)^2/(c^2*x^2+1)+
1)^2)*csgn(I*(1+I*c*x)^2/(c^2*x^2+1))*csgn(I*(1+I*c*x)^2/(c^2*x^2+1)/((1+I*c*x)^2/(c^2*x^2+1)+1)^2)-5/2*b*e*ar
ctan(c*x)/c^2+1/2*a*x^2*d+1/2*x^2*a*e*ln(c^2*x^2+1)-1/2*a*e/c^2+1/2*b*arctan(c*x)*d*x^2

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 149, normalized size = 1.09 \[ \frac {1}{2} \, a d x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d - \frac {{\left (x \log \left (c^{2} x^{2} + 1\right ) - 3 \, x + \frac {2 \, \arctan \left (c x\right )}{c}\right )} b e}{2 \, c} - \frac {{\left (c^{2} x^{2} - {\left (c^{2} x^{2} + 1\right )} \log \left (c^{2} x^{2} + 1\right ) + 1\right )} b e \arctan \left (c x\right )}{2 \, c^{2}} - \frac {{\left (c^{2} x^{2} - {\left (c^{2} x^{2} + 1\right )} \log \left (c^{2} x^{2} + 1\right ) + 1\right )} a e}{2 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))*(d+e*log(c^2*x^2+1)),x, algorithm="maxima")

[Out]

1/2*a*d*x^2 + 1/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d - 1/2*(x*log(c^2*x^2 + 1) - 3*x + 2*arct
an(c*x)/c)*b*e/c - 1/2*(c^2*x^2 - (c^2*x^2 + 1)*log(c^2*x^2 + 1) + 1)*b*e*arctan(c*x)/c^2 - 1/2*(c^2*x^2 - (c^
2*x^2 + 1)*log(c^2*x^2 + 1) + 1)*a*e/c^2

________________________________________________________________________________________

mupad [B]  time = 1.26, size = 227, normalized size = 1.66 \[ \frac {a\,d\,x^2}{2}-\frac {a\,e\,x^2}{2}-\frac {b\,d\,x}{2\,c}+\frac {3\,b\,e\,x}{2\,c}+\frac {b\,d\,x^2\,\mathrm {atan}\left (c\,x\right )}{2}-\frac {b\,e\,x^2\,\mathrm {atan}\left (c\,x\right )}{2}+\frac {a\,e\,\ln \left (c^2\,x^2+1\right )}{2\,c^2}+\frac {b\,d\,\mathrm {atan}\left (\frac {b\,c\,d\,x}{b\,d-3\,b\,e}-\frac {3\,b\,c\,e\,x}{b\,d-3\,b\,e}\right )}{2\,c^2}-\frac {3\,b\,e\,\mathrm {atan}\left (\frac {b\,c\,d\,x}{b\,d-3\,b\,e}-\frac {3\,b\,c\,e\,x}{b\,d-3\,b\,e}\right )}{2\,c^2}+\frac {a\,e\,x^2\,\ln \left (c^2\,x^2+1\right )}{2}-\frac {b\,e\,x\,\ln \left (c^2\,x^2+1\right )}{2\,c}+\frac {b\,e\,\mathrm {atan}\left (c\,x\right )\,\ln \left (c^2\,x^2+1\right )}{2\,c^2}+\frac {b\,e\,x^2\,\mathrm {atan}\left (c\,x\right )\,\ln \left (c^2\,x^2+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)),x)

[Out]

(a*d*x^2)/2 - (a*e*x^2)/2 - (b*d*x)/(2*c) + (3*b*e*x)/(2*c) + (b*d*x^2*atan(c*x))/2 - (b*e*x^2*atan(c*x))/2 +
(a*e*log(c^2*x^2 + 1))/(2*c^2) + (b*d*atan((b*c*d*x)/(b*d - 3*b*e) - (3*b*c*e*x)/(b*d - 3*b*e)))/(2*c^2) - (3*
b*e*atan((b*c*d*x)/(b*d - 3*b*e) - (3*b*c*e*x)/(b*d - 3*b*e)))/(2*c^2) + (a*e*x^2*log(c^2*x^2 + 1))/2 - (b*e*x
*log(c^2*x^2 + 1))/(2*c) + (b*e*atan(c*x)*log(c^2*x^2 + 1))/(2*c^2) + (b*e*x^2*atan(c*x)*log(c^2*x^2 + 1))/2

________________________________________________________________________________________

sympy [A]  time = 3.31, size = 202, normalized size = 1.47 \[ \begin {cases} \frac {a d x^{2}}{2} + \frac {a e x^{2} \log {\left (c^{2} x^{2} + 1 \right )}}{2} - \frac {a e x^{2}}{2} + \frac {a e \log {\left (c^{2} x^{2} + 1 \right )}}{2 c^{2}} + \frac {b d x^{2} \operatorname {atan}{\left (c x \right )}}{2} + \frac {b e x^{2} \log {\left (c^{2} x^{2} + 1 \right )} \operatorname {atan}{\left (c x \right )}}{2} - \frac {b e x^{2} \operatorname {atan}{\left (c x \right )}}{2} - \frac {b d x}{2 c} - \frac {b e x \log {\left (c^{2} x^{2} + 1 \right )}}{2 c} + \frac {3 b e x}{2 c} + \frac {b d \operatorname {atan}{\left (c x \right )}}{2 c^{2}} + \frac {b e \log {\left (c^{2} x^{2} + 1 \right )} \operatorname {atan}{\left (c x \right )}}{2 c^{2}} - \frac {3 b e \operatorname {atan}{\left (c x \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\\frac {a d x^{2}}{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c*x))*(d+e*ln(c**2*x**2+1)),x)

[Out]

Piecewise((a*d*x**2/2 + a*e*x**2*log(c**2*x**2 + 1)/2 - a*e*x**2/2 + a*e*log(c**2*x**2 + 1)/(2*c**2) + b*d*x**
2*atan(c*x)/2 + b*e*x**2*log(c**2*x**2 + 1)*atan(c*x)/2 - b*e*x**2*atan(c*x)/2 - b*d*x/(2*c) - b*e*x*log(c**2*
x**2 + 1)/(2*c) + 3*b*e*x/(2*c) + b*d*atan(c*x)/(2*c**2) + b*e*log(c**2*x**2 + 1)*atan(c*x)/(2*c**2) - 3*b*e*a
tan(c*x)/(2*c**2), Ne(c, 0)), (a*d*x**2/2, True))

________________________________________________________________________________________